home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…on Library 1994 September / ARPLE-Sept-94-Supplement.iso / AppleSoft / System 7.5 Demos *Revised* / System Folder / Control Panels / ATM™ GX / ATM™ GX.rsrc / TEXT_128_Subst POST Template.txt < prev    next >
Encoding:
Text File  |  1994-08-02  |  6.7 KB  |  102 lines

  1. %!PS-AdobeFont-1.0: <FontName> 001.004
  2. %%CreationDate: <Date>
  3. %%VMusage: 10000 10000
  4. %%Creator: Macintosh ATM GX 3.7
  5. {{(<FontName>)(_)search{exch pop exch pop cvn dup findfont/FontName get eq}{pop false}ifelse}
  6. systemdict/resourcestatus known{/<FontName>/Font resourcestatus{pop pop pop true}{exec}ifelse exit}if
  7. FontDirectory/<FontName> known{pop true exit}if
  8. systemdict/SharedFontDirectory known{SharedFontDirectory/<FontName> known{pop true exit}if}if
  9. systemdict/deletefile known{{(%font%<FontName>)(fonts/<FontName>)}{status{4{pop}repeat pop true exit}if}forall}if
  10. exec exit}loop{save true}{false}ifelse
  11. /<SubstituteFontName> findfont dup maxlength 18 add dict begin
  12. /SubstMaster exch def/WorkDict 4 dict def
  13. SubstMaster {exch dup dup dup /FID eq exch /UniqueID eq or exch /XUID eq or {pop pop}{exch def}ifelse} bind forall
  14. /FontName /<FontName> def/FontType 3 def<UniqueID>
  15. /FontBBox[<FontBBox> 2 {4 2 roll FontMatrix transform} repeat]def
  16. /CharBBox FontBBox dup length array copy def
  17. /xtfm [FontMatrix 0 get /mul cvx FontMatrix 4 get 0 ne {FontMatrix 4 get /add cvx} if] cvx bind def
  18. /FontMatrix [1 0 FontInfo/ItalicAngle get <ItalicAngle> sub sin 1 0 0] def
  19. /FontInfo FontInfo dup length dict begin {def} forall
  20. /FullName (<FontName> Substitution) def
  21. /FamilyName (<FontName>) def
  22. /ItalicAngle <ItalicAngle> def
  23. <UnderlineInfo> 0 exch SubstMaster /FontMatrix get transform /UnderlineThickness exch def pop 0 exch SubstMaster /FontMatrix get transform /UnderlinePosition exch def pop
  24. currentdict end def
  25. currentdict /StrokeWidth known not {/StrokeWidth 0 def} if
  26. /dvlen FontInfo /BlendAxisTypes get length def
  27. /cvlen FontInfo /BlendDesignPositions get length def
  28. /str 1 string def
  29. currentdict
  30. /$$SubUD$$ where {pop false false}{/shareddict where {pop currentshared not dup {true setshared} if shareddict}{false userdict} ifelse /$$SubUD$$ 22 dict put true} ifelse
  31. $$SubUD$$ begin {
  32. $$SubUD$$ /bp {bind put} bind put $$SubUD$$ /bd {bind def} bp
  33. $$SubUD$$ /pwinstr {3 -1 roll cvi 32768 add dup 256 idiv dup 256 mod 4 index 4 index 3 -1 roll put 256 mul sub 2 index 2 index 1 add 3 -1 roll put 2 add} bp
  34. $$SubUD$$ /pinstr {exch 3 sub exch 128.0 add abs dup cvi dup 4 index 4 index 3 -1 roll put sub 256 mul dup cvi dup 4 index 4 index 1 add 3 -1 roll put sub 256 mul cvi 2 index 2 index 2 add 3 -1 roll put} bp
  35. $$SubUD$$ /gwfrstr {2 copy 2 copy get 256 mul 3 1 roll 1 add get add 32768 sub exch 2 add exch} bp
  36. $$SubUD$$ /gwtvec {[3 1 roll cvlen {2 copy 2 copy 2 copy get 256 mul 3 1 roll 1 add get add 256 mul 3 1 roll 2 add get add 65536.0 div 128.0 sub 3 1 roll 3 add} repeat pop pop]} bp
  37. $$SubUD$$ /GetGlyphString {dup InfoDict exch known {InfoDict exch get}{dup InfoDict exch 3 cvlen 3 mul add string dup 0 UpperMaster put put InfoDict exch get} ifelse} bp
  38. $$SubUD$$ /X {GetGlyphString 1 pwinstr 3 cvlen mul add dvlen 2 add 2 roll ConvertDesignVector cvlen 2 add -2 roll cvlen {3 -1 roll pinstr} repeat pop pop} bp
  39. $$SubUD$$ /Y {dup ExpandDict exch 4 -1 roll xtfm 2 div put X} bp
  40. $$SubUD$$ /Z {dup CompressDict exch 4 -1 roll put X} bp
  41. $$SubUD$$ /L {dup GetGlyphString 0 LowerMaster put} bp
  42. $$SubUD$$ /S {CharStrings exch get CharStrings exch 2 index exch put L} bp
  43. $$SubUD$$ /R {3 index 3 index CharStrings dup 4 1 roll exch get put dvlen add copy exch pop exec 3 -1 roll pop exec} bp
  44. $$SubUD$$ /RX{{X}4 R} bp $$SubUD$$ /RY{{Y}5 R} bp $$SubUD$$ /RZ{{Z}5 R} bp
  45. systemdict /internaldict known {1183615869 systemdict /internaldict get {exec} stopped {false}{dup /setweightvector known {true}{pop false} ifelse} ifelse}{false} ifelse
  46. {/setweightvector get $$SubUD$$ exch /@setweightvector exch put
  47. $$SubUD$$ /SubBuildChar {exch dup begin $$SubUD$$ begin WorkDict begin
  48. /fontdict exch def/code exch def/glyph Encoding code get def
  49. InfoDict glyph known not glyph /.notdef ne and {InfoDict /space known Encoding 32 get /space eq and {/glyph /space def /code 32 def}{/glyph /.notdef def} ifelse} if
  50. glyph /.notdef ne {InfoDict glyph get dup 0 get /blnd exch def BlendsArray blnd get begin
  51. 1 gwfrstr xtfm 0 CharBBox aload pop setcachedevice
  52. currentdict /FID known {
  53. fontdict /PaintType get PaintType ne fontdict /CharStrings get CharStrings ne or fontdict /StrokeWidth get StrokeWidth ne or
  54. {currentdict end dup length dict begin
  55. {exch dup /FID eq {pop pop}{exch def} ifelse} forall
  56. /PaintType fontdict /PaintType get def
  57. /CharStrings fontdict /CharStrings get def
  58. /StrokeWidth fontdict /StrokeWidth get def
  59. gwtvec /WeightVector exch def
  60. /@SUB currentdict definefont setfont
  61. fontdict /BlendsArray get blnd currentdict put}
  62. {currentdict setfont gwtvec currentdict exch @setweightvector} ifelse
  63. }{/PaintType fontdict /PaintType get def
  64. /CharStrings fontdict /CharStrings get def
  65. /StrokeWidth fontdict /StrokeWidth get def
  66. /@SUB currentdict definefont setfont
  67. gwtvec currentdict exch @setweightvector} ifelse
  68. ExpandDict glyph known {ExpandDict glyph get 0 translate}{CompressDict glyph known {CompressDict glyph get 1 scale} if} ifelse
  69. mark cachestatus 0 setcachelimit 0 0 moveto glyph glyphshow setcachelimit cleartomark end } if
  70. end end end} bp}
  71. {systemdict /rectfill known {$$SubUD$$ /dct1 {0 setcachelimit} bp}{$$SubUD$$ /dct1 {} put} ifelse
  72. $$SubUD$$ /SubBuildChar {exch dup begin $$SubUD$$ begin WorkDict begin
  73. /fontdict exch def/code exch def/glyph Encoding code get def
  74. InfoDict glyph known not glyph /.notdef ne and {InfoDict /space known Encoding 32 get /space eq and {/glyph /space def /code 32 def}{/glyph /.notdef def} ifelse} if
  75. glyph /.notdef ne {InfoDict glyph get dup BlendsArray exch 0 get get begin
  76. save exch
  77. 1 gwfrstr xtfm 0 CharBBox aload pop setcachedevice
  78. gwtvec /WeightVector exch def
  79. /Encoding fontdict /Encoding get def
  80. /PaintType fontdict /PaintType get def
  81. /CharStrings fontdict /CharStrings get def
  82. /StrokeWidth fontdict /StrokeWidth get def
  83. ExpandDict glyph known {ExpandDict glyph get 0 translate}{CompressDict glyph known {CompressDict glyph get 1 scale} if} ifelse
  84. /$Blend [false WeightVector dup length 1 sub -1 1 {1 index dup length 3 -1 roll sub get dup 0 eq {pop 1 index {/exch load 3 1 roll} if /pop load 3 1 roll}{dup 1 eq {pop}{2 index {/exch load 4 1 roll} if 3 1 roll /mul load 3 1 roll} ifelse 1 index {/add load 3 1 roll} if exch pop true exch} ifelse} for pop {/add load} if] cvx def
  85. dct1 /@SUB currentdict definefont setfont 0 0 moveto str 0 code put str show
  86. restore end } if
  87. end end end} bp} ifelse
  88. } if {false setshared} if
  89. begin
  90. /BuildChar $$SubUD$$ /SubBuildChar get def
  91. /UpperMaster 0 def /LowerMaster 1 def
  92. /BlendsArray [
  93. SubstMaster [<UpperMaster> ConvertDesignVector] makeblendedfont
  94. SubstMaster [<LowerMaster> ConvertDesignVector] makeblendedfont dup begin/FontMatrix FontMatrix <LowerScale> dup matrix scale matrix concatmatrix def end
  95. ] def
  96. /InfoDict <NumChars> dict def
  97. /ExpandDict <NumExpandChars> dict def
  98. /CompressDict <NumCondenseChars> dict def
  99. <SpecialHeader><CharTable>end end
  100. currentdict end
  101. /<FontName> exch definefont pop{restore}if
  102.